package com.taysear.parcel.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="parcel_detail")
public class ParcelDetail implements Serializable{

	@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer parcelDetailId;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="senderStation", insertable=true, updatable=false)
	private Station senderStation;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="senderSubstation", insertable=true, updatable=false)
	private Substation senderSubstation;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="sender", insertable=true, updatable=false)
	private Customer sender;
	private String senderName;
	private String senderTel;
	private String senderIdentification;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="receiverStation", insertable=true, updatable=false)
	private Station receiverStation;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="receiverSubstation", insertable=true, updatable=false)
	private Substation receiverSubstation;
	@ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="receiver", insertable=true, updatable=false)
	private Customer receiver;
	private String receiverName;
	private String receiverTel;
	private String receiverIdentification;
	
	public Integer getParcelDetailId() {
		return parcelDetailId;
	}
	public void setParcelDetailId(Integer parcelDetailId) {
		this.parcelDetailId = parcelDetailId;
	}
	public Station getSenderStation() {
		return senderStation;
	}
	public void setSenderStation(Station senderStation) {
		this.senderStation = senderStation;
	}
	public Substation getSenderSubstation() {
		return senderSubstation;
	}
	public void setSenderSubstation(Substation senderSubstation) {
		this.senderSubstation = senderSubstation;
	}
	public Customer getSender() {
		return sender;
	}
	public void setSender(Customer sender) {
		this.sender = sender;
	}
	public String getSenderName() {
		return senderName;
	}
	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}
	public String getSenderTel() {
		return senderTel;
	}
	public void setSenderTel(String senderTel) {
		this.senderTel = senderTel;
	}
	public Station getReceiverStation() {
		return receiverStation;
	}
	public void setReceiverStation(Station receiverStation) {
		this.receiverStation = receiverStation;
	}
	public Substation getReceiverSubstation() {
		return receiverSubstation;
	}
	public void setReceiverSubstation(Substation receiverSubstation) {
		this.receiverSubstation = receiverSubstation;
	}
	public Customer getReceiver() {
		return receiver;
	}
	public void setReceiver(Customer receiver) {
		this.receiver = receiver;
	}
	public String getReceiverName() {
		return receiverName;
	}
	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}
	public String getReceiverTel() {
		return receiverTel;
	}
	public void setReceiverTel(String receiverTel) {
		this.receiverTel = receiverTel;
	}
	public String getSenderIdentification() {
		return senderIdentification;
	}
	public void setSenderIdentification(String senderIdentification) {
		this.senderIdentification = senderIdentification;
	}
	public String getReceiverIdentification() {
		return receiverIdentification;
	}
	public void setReceiverIdentification(String receiverIdentification) {
		this.receiverIdentification = receiverIdentification;
	}
}
